<table>
    <thead>
        <tr>
            <th><g:message code="b2b.contractDetail.serialNumber.label" default="Serial Number" />
            <th><g:message code="b2b.contractDetail.category.label" default="Category" />
            <th><g:message code="b2b.contractDetail.discount.label" default="Discount" />
            <th><g:message code="b2b.contractDetail.specialDiscount.label" default="Special Discount" />
            <th><g:message code="b2b.contractDetail.finalDiscount.label" default="Final Discount" />
            <th><g:message code="b2b.contractDetail.expiryDate.label" default="Expiry Date" />
        </tr>
    </thead>
    <tbody>
    <g:each in="${contractDetailInstanceList}" status="i" var="contractDetailInstance">
        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
            <td>${fieldValue(bean: contractDetailInstance, field: "serialNumber")}</td>
            <td>${fieldValue(bean: contractDetailInstance, field: "category")}</td>
            <td><g:formatNumber number="${contractDetailInstance?.discount}" format="###,##0.00%" /></td>
            <td><g:formatNumber number="${contractDetailInstance?.specialDiscount}" format="###,##0.00%" /></td>
            <td><g:formatNumber number="${contractDetailInstance?.finalDiscount}" format="###,##0.00%" /></td>
            <td><g:formatDate date="${contractDetailInstance?.expiryDate}" /></td>
        </tr>
    </g:each>
    </tbody>
</table>